package com.spooky.sync.persistence.entity;

public class BaseEntity {
	public static final String ID = "mId";
	protected Long mId;

	protected void setId(Long id) {
		mId = id;
	}

	public Long getId() {
		return mId;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj == null) {
			return false;
		}
		if (obj instanceof Long) {
			return ((Long) obj).equals(mId);
		}
		if (obj instanceof BaseEntity) {
			return ((BaseEntity) obj).mId.equals(mId);
		}
		return false;
	}

	@Override
	public String toString() {
		return "BaseEntity [mId=" + mId + "]\n";
	}
}
